//
//  TKPanoramaView.h
/*
 * This file is part of the TKPanorama library.
 *
 *  Author: Tae Kim <conrkim@gmail.com>
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; version 3 of
 * the License
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */

/*
 이 파일을 제공받는 사람은 이 주석을 지울 수 없습니다.
 
 TKPanorama library는 PanoramaGL library를 업그레이드한 iOS 기반의 라이브러리로서, 다음 부분에서 업그레이드가 이루어졌습니다.
 1. PanoramaGL 부분에서 #ifdef ORIGINAL_파일명_확장자명 ~ #endif 로 싸인 부분은 제외되었음.
 2. PanoramaGL 부분에서 #ifdef MODIFIED_BY_TAEKIM ~ #endif 로 싸인 부분은 새로 추가되었음.
 3. 원본은 폰을 기울이거나 화면을 터치하고 있을 때 파노라마가 움직였으나, 손가락으로 터치하여 드래그한 만큼 움직이도록 수정함.
 4. 확대/축소 후 자유롭게 움직일 수 있도록 업그레이드
 5. 약간의 상수 변경
 
 2012 Tae Kim.
 */

#import "PLView.h"

@protocol TKPanoramaViewDelegate;

/* default */
@interface TKPanoramaView : PLView <UIGestureRecognizerDelegate>
{
    UITapGestureRecognizer* tapGesture;
    UIPanGestureRecognizer* panGesture;
    UIPinchGestureRecognizer* pinchGesture;
    CGSize originalSize;
}

@property (nonatomic, assign, readonly) CGSize imageSize;
@property (nonatomic, assign) NSObject<TKPanoramaViewDelegate> *delegate;

- (float)getYaw;
- (CGFloat)getTransY;
- (CGFloat)getScale;

- (void)setYaw:(float)value;
- (void)setScale:(CGFloat)scale;
- (void)setBackgroundImageWithPath:(NSString *)path;

- (void)cleanViewInternally;
- (void)drawViewInternally;

@end


/* delegate */
@protocol TKPanoramaViewDelegate <PLViewDelegate>
@optional
- (void)detectedTap:(UITapGestureRecognizer *)gestureRecognizer TKView:(TKPanoramaView *)panoramaView;
- (void)detectedPan:(UIPanGestureRecognizer *)gestureRecognizer TKView:(TKPanoramaView *)panoramaView;
- (void)detectedPinch:(UIPinchGestureRecognizer *)gestureRecognizer TKView:(TKPanoramaView *)panoramaView;
- (void)didDrawTKView:(TKPanoramaView *)panoramaView;
@end